# -*- coding: UTF-8 -*-
from sympy import *
from multiprocessing import Queue
import time

class value:
    def __init__(self,x_coordinate,y_coordinate,z_coordinate,pressure):
        self.x_coordinate = x_coordinate
        self.y_coordinate = y_coordinate
        self.z_coordinate = z_coordinate
        self.pressure = pressure

    x = Symbol('x')
    y = Symbol('y')

    value_func =5.996e-07 * x^3 - 1.106e-05 * x^2 + 0.1009  * x + 2.31 - y

     # 阀门阀阻函数产生数据，改变扬程和流量
    def produce_SQ(self,q1:Queue,q2:Queue):
        global  value_func
        x = q1.get(True)
        S_num = solve(value_func,x)
        q2.put(S_num)
        time.sleep(1)
